/**
 * @Title: index.js
 * @Description: index
 * @author: Fanchao
 * @date: 2020/7/29 11:40 下午
 * @version V1.0
 */
import React from "react";
import styles from "./index.less";
import PropTypes from "prop-types";
import PlusOutlined from "@ant-design/icons/lib/icons/PlusOutlined";
import DownloadOutlined from "@ant-design/icons/lib/icons/DownloadOutlined";
import ExportOutlined from "@ant-design/icons/lib/icons/ExportOutlined";

const AddSomeButton = ({ title }) => {
    if (title === "下载模板") {
        return (
            <div className={styles.addSomeButton}>
                <DownloadOutlined style={{ color: "#424242" }}/> {title}
            </div>
        );
    } else if (title.includes("导入")) {
        return (
            <div className={styles.addSomeButton}>
                <ExportOutlined style={{ color: "#424242" }}/> {title}
            </div>
        );
    } else {
        return (
            <div className={styles.addSomeButton}>
                <PlusOutlined style={{ color: "#424242" }}/> {title}
            </div>
        );
    }

};
AddSomeButton.propTypes = {
    title: PropTypes.string.isRequired
};
export default AddSomeButton;
